import styles from './index.module.scss'
import Link from 'next/link'
import { DOWNLOAD_URL } from '@/constant'
import cm from 'classnames'
import Image from '@c/image'

const Index = () => {
  return (
    <div className={styles.error}>
      <img loading="lazy" alt="异常" src="/images/error.png" />
      <p>
        播放异常，使用<span>客户端</span>播放更稳定，下载体验一下吧～
      </p>
      <div className={styles.btnGroup}>
        <div className={styles.b_item}>
          <p className={styles.title}>电视端</p>
          <p className={styles.install} onClick={() => sessionStorage.setItem('type', 'usb')}>
            <Link href="/download/usb">有U盘安装指南{'>>'}</Link>
          </p>
          <p
            className={cm(styles.install, styles.installBottom)}
            onClick={() => sessionStorage.setItem('type', 'SendFile')}
          >
            <Link href="/download/withoutusb">无U盘安装指南{'>>'}</Link>
          </p>
          <a rel="nofollow" download href={DOWNLOAD_URL.tv} className={styles.errorDown}>
            下载安装包
          </a>
        </div>
        <div className={styles.b_item}>
          <p className={cm(styles.title, styles.titleAndroid)}>安卓端</p>
          <Image src="/images/app_code.png" className={styles.code} alt="二维码" />
          <p className={styles.tips}>安装手机浏览器扫描二维码下载</p>
        </div>
      </div>
    </div>
  )
}

export default Index
